using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using WODPL.Models;

namespace WODPL.GameComponents
{
    public class GameCamera
    {
        private readonly GraphicsDevice device;
        private CharacterModel characterModel;

        public GameCamera(GraphicsDevice device, CharacterModel characterModel)
        {
            this.characterModel =characterModel;
            this.device = device;
        }

        public Matrix ViewMatrix
        {
            get 
            {
                return Matrix.CreateLookAt(characterModel.Origin + new Vector3(100, 100, 100), characterModel.Origin, Vector3.Up); 
            }
        }

        public Matrix ProjectionMatrix
        {
            get
            {
                return Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, (float)device.Viewport.Width / device.Viewport.Height,
                                                         1.0f, 500);
            }
        }
    }
}